//登录
const mysql =require("../lib/db")
function userLogin(username,userpwd){
    let sql="select * from userlogin where userName='"+username+"'";
    mysql.querySql(sql).then(data=>{
        if(data.length==0){
            console.log("用户名不存在");
        }else{
            if(data[0].userPassword==userpwd){
                console.log("登录成功")
            }else{
                console.log("密码错误")
            }
        }
    })
}
module.exports=userLogin;